﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CondominiosREST.Dominio;
using System.ServiceModel.Web;

namespace CondominiosREST
{
    [ServiceContract]
    public interface IResidentes
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Residentes", ResponseFormat = WebMessageFormat.Json)]
        RResidente CrearResidente(RResidente dresidente);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Residentes/{dni}", ResponseFormat = WebMessageFormat.Json)]
        RResidente ObtenerResidente(string dni);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Residentes", ResponseFormat = WebMessageFormat.Json)]
        RResidente ModificarResidente(RResidente dresidente);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Residentess", ResponseFormat = WebMessageFormat.Json)]
        void EliminarResidente(RResidente residente);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Residentes", ResponseFormat = WebMessageFormat.Json)]
        ICollection<RResidente> ListarTodosLosResidentes();
    }
}
